<template>
	 
  <view>
   <image class="img" src="/static/wancheng.png" ></image>
		<navigator url="../dingdan/dingdan" >
			<button class="button" type="primary" @click="changeTo">订单完成O(∩_∩)O</button>
		</navigator>
		
		<view>
			
		</view>
		
  </view>
  
</template>
<script>
import axios from 'axios';
import config from '../../common/config';
  export default {
    data() {
      return {
        dataForm:
			{
				suId:uni.getStorageSync('suId')+"",
				state:"2"
			}
		
      };
    },
	methods:{
		changeTo(){
			console.log(JSON.stringify(this.dataForm))
			axios.put(config.baseUrl+'supplier/ssmsuorder/updateOrderState',this.dataForm)
			.then((response)=>{
				if(response.data.code==0){
					uni.reLaunch({
						url:'/pages/dingdan/dingdan'
					})
				}
			})
			
			
			
		}
	}
  }
</script>

<style scoped>
	.img{
		height: 500rpx;
		width: 500rpx;
		margin-left: 130rpx;
		margin-top: 150rpx;
	}
	.button{
		margin-top: 100rpx;
	}
	

</style>
